package com.hxzy.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hxzy.course.pojo.Staff;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface StaffMapper extends BaseMapper<Staff> {

    /**查询所有教练
     * @Author hjs
     * @Description //TODO
     * @Date 13:56 2021/9/24
     * @Param []
     * @return java.util.List<com.hxzy.course.pojo.Staff>
     **/
    @Select("select staff.* from staff join role on staff.staff_job=role.role_name where role.role_name='教练' ")
    public List<Staff> findAllStaff();

    /**查询所有销售
     * @Author hjs
     * @Description //TODO
     * @Date 11:40 2021/9/26
     * @Param []
     * @return java.util.List<com.hxzy.course.pojo.Staff>
     **/
    @Select("select staff.* from staff join role on staff.staff_job=role.role_name where role.role_name='销售' ")
    public List<Staff> findAllSell();
}
